<template>
	<div class="user-agree" v-show="showModal">
		<view class="center-box">
			<view class="top">
				<view class="top-title">
					用户协议
				</view>
			</view>
			<view class="list">
				<view>亲爱的用户您好！</view>
				<view>欢迎来到CYQ's message board。</view>
				<view style="height: 20rpx;"></view>
				<view>在使用本程序之前呢，情恋仔细阅读以下几点要求，同意后便可开怡使用：</view>
				<view style="height: 20rpx;"></view>
				<view>1.禁止发布暴力，血腥，色情，涉政等违法信息;</view>
				<view>2.禁止发布对仕可人的谩骂与攻击;</view>
				<view>3.禁止发布仕阿涉嫌钓鱼，色情的危险网址。</view>
				<view style="height: 20rpx;"></view>
				<view>补：本程序将会获取您微信账户的部分信息，仅用于留言列表和顶部栏的头像，昵称的展示。</view>
			</view>
			<view class="btns">
				<view class="agree" @click="handelAgree">
					我同意
				</view>
				<view class="dis-agree" >
					<navigator open-type="exit" target="miniProgram">我不同意</navigator>
				</view>
			</view>
		</view>
	</div>
</template>

<script>
	import iconfont from '../static/iconfont.png'
	export default {
		name: 'user-agree',
		data() {
			return {
				showModal: false,
				infoList: [{
					avatar: '../static/authorAvatar.jpg',
					name: 'CYQ',
					desc: '- -开发者'
				}, {
					avatar: iconfont,
					name: 'iconfont',
					desc: '- -图标来源'
				}]
			}
		},
		methods: {
			handelAgree() {
				this.showModal = false
			}
		}
	}
</script>

<style scoped lang='scss'>
	.user-agree {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background: rgba(0, 0, 0, 0.5);
		z-index: 9999;

		.center-box {
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			width: 75%;
			padding: 32rpx;
			border-radius: 20rpx;
			opacity: 1;
			background: rgba(255, 255, 255, 1);
			-webkit-animation: zoom_move_4 1s;

			.top {
				display: flex;
				justify-content: space-between;

				.top-title {
					font-size: 36rpx;
				}

			}

			.list {
				margin-top: 20rpx;
				font-size: 24rpx;
			}

			.btns {
				margin-top: 30rpx;

				.agree,
				.dis-agree {
					width: 100%;
					height: 100rpx;
					line-height: 100rpx;
					text-align: center;
					border-radius: 50rpx;
				}

				.agree {
					background: #ffc109;
					color: #fff;
				}

				.dis-agree {
					margin-top: 30rpx;
					background: #efefef;
					color: #050505;
				}
			}

		}
	}

	@-webkit-keyframes zoom_move_4 {
		0% {
			opacity: 0;
		}

		60% {
			opacity: 1;
		}
	}
</style>
